<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
//是否处于调试期
session_start();
//网站根目录
define('ROOT',dirname(dirname(str_replace("\\", "/", __FILE__))).'/');
//载入全局变量
include_once ROOT.'config/web.config.inc.php';
global $_G;
//调试期间开启所有错误
if($_G['site_debug'])
{
    error_reporting(E_ALL);
}
else
    error_reporting(0);
/*自动加载类函数*/
set_include_path(get_include_path().PATH_SEPARATOR. ROOT.'core/Main');
function wjp_autoload($classname)
{
    require "$classname.php";
}
spl_autoload_register("wjp_autoload");


Initialize::init();
$rout=  Loader::load('router');
Dispatcher::dispatch($rout);


?>
